<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="ExDoc v0.29.0">
    <meta name="project" content="maps_in v0.2.0">

    <title>maps_in — maps_in v0.2.0</title>
    <link rel="stylesheet" href="dist/html-erlang-4XYKNH4U.css" />

    <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
    <script src="dist/handlebars.templates-X7YVL3G2.js"></script>
    <script src="dist/sidebar_items-61158A85.js"></script>

      <script src="docs_config.js"></script>

    <script async src="dist/html-XN2TSG4M.js"></script>


  </head>
  <body data-type="extras" class="page-extra">
    <script>

      try {
        var settings = JSON.parse(localStorage.getItem('ex_doc:settings') || '{}');

        if (settings.theme === 'dark' ||
           ((settings.theme === 'system' || settings.theme == null) &&
             window.matchMedia('(prefers-color-scheme: dark)').matches)
           ) {
          document.body.classList.add('dark')
        }
      } catch (error) { }
    </script>

<div class="main">

<button class="sidebar-button sidebar-toggle" aria-label="toggle sidebar">
  <i class="ri-menu-line ri-lg" title="Collapse/expand sidebar"></i>
</button>

<section class="sidebar">
  <form class="sidebar-search" action="search.html">
    <button type="submit" class="search-button" aria-label="Submit Search">
      <i class="ri-search-2-line" aria-hidden="true" title="Submit search"></i>
    </button>
    <button type="button" tabindex="-1" class="search-close-button" aria-label="Cancel Search">
      <i class="ri-close-line ri-lg" aria-hidden="true" title="Cancel search"></i>
    </button>
    <label class="search-label">
      <p class="sr-only">Search</p>
      <input name="q" type="text" class="search-input" placeholder="Search..." aria-label="Input your search terms" autocomplete="off" />
    </label>
  </form>

  <div class="autocomplete">
    <div class="autocomplete-results">
    </div>
  </div>

  <div class="sidebar-header">

    <div class="sidebar-projectDetails">
      <a href="readme.html" class="sidebar-projectName" translate="no">
maps_in
      </a>
      <strong class="sidebar-projectVersion" translate="no">
        v0.2.0
      </strong>
    </div>
    <ul class="sidebar-listNav">
      <li><a id="extras-list-link" href="#full-list">Pages</a></li>

        <li><a id="modules-list-link" href="#full-list">Modules</a></li>


    </ul>
  </div>

  <div class="gradient"></div>
  <ul id="full-list" class="sidebar-fullList"></ul>
</section>

<section class="content">
  <output role="status" id="toast"></output>
  <div class="content-outer">
    <div id="content" class="content-inner">

<h1>
<button class="settings display-settings">
  <i class="ri-settings-3-line"></i>
  <span class="sr-only">Settings</span>
</button>


    <a href="https://github.com/williamthome/maps_in/blob/v0.2.0/README.md#L1" title="View Source" class="view-source" rel="help">
      <i class="ri-code-s-slash-line" aria-hidden="true"></i>
      <span class="sr-only">View Source</span>
    </a>

  <span>maps_in</span>
</h1>

<p>An Erlang library to handle nested maps.</p><h2 id="table-of-contents" class="section-heading">
  <a href="#table-of-contents" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">table-of-contents</p>
  </a>
  Table of contents
</h2>
<ul><li><a href="#general-info">General info</a></li><li><a href="#usage">Usage</a><ul><li><a href="#filter3">filter/3</a></li><li><a href="#filtermap3-otp-240">filtermap/3</a></li><li><a href="#find3">find/3</a></li><li><a href="#fold4">fold/4</a></li><li><a href="#foreach3">foreach/3</a></li><li><a href="#get2">get/2</a></li><li><a href="#get3">get/3</a></li><li><a href="#keys2">keys/2</a></li><li><a href="#is_key3">is_key/3</a></li><li><a href="#iterator2-otp-21">iterator/2</a></li><li><a href="#map3">map/3</a></li><li><a href="#merge3">merge/3</a></li><li><a href="#merge_with4-otp-240">merge_with/4</a></li><li><a href="#put3">put/3</a></li><li><a href="#remove3">remove/3</a></li><li><a href="#size2">size/2</a></li><li><a href="#take3">take/3</a></li><li><a href="#to_list2">to_list/2</a></li><li><a href="#update3">update/3</a></li><li><a href="#update_with3">update_with/3</a></li><li><a href="#update_with4">update_with/4</a></li><li><a href="#values2">values/2</a></li><li><a href="#with3">with/3</a></li><li><a href="#without3">without/3</a></li></ul></li><li><a href="#build">Build</a></li><li><a href="#test">Test</a></li></ul><h2 id="general-info" class="section-heading">
  <a href="#general-info" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">general-info</p>
  </a>
  General info
</h2>
<p>Erlang does not provide functions to handle nested maps, so this lib has this purpose and always uses a list of keys to manipulate maps.</p><h2 id="usage" class="section-heading">
  <a href="#usage" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">usage</p>
  </a>
  Usage
</h2>
<h3 id="filter-3" class="section-heading">
  <a href="#filter-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">filter-3</p>
  </a>
  filter/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="3999059089-1">#{</span><span class="ss">erlang</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3999059089-2">#{</span><span class="ss">example</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3999059089-3">#{</span><span class="ss">a</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">c</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;a&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;b&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;c&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p" data-group-id="3999059089-3">}</span><span class="p" data-group-id="3999059089-2">}</span><span class="p" data-group-id="3999059089-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="3999059089-4">#{</span><span class="ss">erlang</span><span class="w"> </span><span class="p">=&gt;</span><span class="w">
      </span><span class="p" data-group-id="3999059089-5">#{</span><span class="ss">example</span><span class="w"> </span><span class="p">=&gt;</span><span class="w">
            </span><span class="p" data-group-id="3999059089-6">#{</span><span class="ss">a</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="ss">b</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="ss">c</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="s">&quot;a&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="s">&quot;b&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="s">&quot;c&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p" data-group-id="3999059089-6">}</span><span class="p" data-group-id="3999059089-5">}</span><span class="p" data-group-id="3999059089-4">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Pred</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fun</span><span class="p" data-group-id="3999059089-7">(</span><span class="n">K</span><span class="p">,</span><span class="w"> </span><span class="n">V</span><span class="p" data-group-id="3999059089-7">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nf">is_atom</span><span class="p" data-group-id="3999059089-8">(</span><span class="n">K</span><span class="p" data-group-id="3999059089-8">)</span><span class="w"> </span><span class="nf">andalso</span><span class="w"> </span><span class="p" data-group-id="3999059089-9">(</span><span class="n">V</span><span class="w"> </span><span class="ow">rem</span><span class="w"> </span><span class="mi">2</span><span class="p" data-group-id="3999059089-9">)</span><span class="w"> </span><span class="o">=:=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="k">end</span><span class="p">.</span><span class="w">
</span><span class="p">#</span><span class="n">Fun</span><span class="o">&lt;</span><span class="ss">erl_eval</span><span class="p">.</span><span class="mf">41.3316493</span><span class="o">&gt;</span><span class="w">
</span><span class="mi">3</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">filter</span><span class="p" data-group-id="3999059089-10">(</span><span class="p" data-group-id="3999059089-11">[</span><span class="ss">erlang</span><span class="p">,</span><span class="w"> </span><span class="ss">example</span><span class="p" data-group-id="3999059089-11">]</span><span class="p">,</span><span class="w"> </span><span class="n">Pred</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="3999059089-10">)</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="3999059089-12">#{</span><span class="ss">erlang</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3999059089-13">#{</span><span class="ss">example</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3999059089-14">#{</span><span class="ss">a</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="ss">c</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p" data-group-id="3999059089-14">}</span><span class="p" data-group-id="3999059089-13">}</span><span class="p" data-group-id="3999059089-12">}</span></code></pre><h3 id="filtermap-3-otp-24-0" class="section-heading">
  <a href="#filtermap-3-otp-24-0" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">filtermap-3-otp-24-0</p>
  </a>
  filtermap/3 (OTP 24.0)
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="find-3" class="section-heading">
  <a href="#find-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">find-3</p>
  </a>
  find/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="fold-4" class="section-heading">
  <a href="#fold-4" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">fold-4</p>
  </a>
  fold/4
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="foreach-3" class="section-heading">
  <a href="#foreach-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">foreach-3</p>
  </a>
  foreach/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="get-2" class="section-heading">
  <a href="#get-2" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">get-2</p>
  </a>
  get/2
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="7939571483-1">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7939571483-2">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="7939571483-2">}</span><span class="p" data-group-id="7939571483-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="7939571483-3">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7939571483-4">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="7939571483-4">}</span><span class="p" data-group-id="7939571483-3">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">get</span><span class="p" data-group-id="7939571483-5">(</span><span class="p" data-group-id="7939571483-6">[</span><span class="ss">my</span><span class="p">,</span><span class="w"> </span><span class="ss">nested</span><span class="p" data-group-id="7939571483-6">]</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="7939571483-5">)</span><span class="p">.</span><span class="w">
</span><span class="ss">map</span></code></pre><h3 id="get-3" class="section-heading">
  <a href="#get-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">get-3</p>
  </a>
  get/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="0211561973-1">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0211561973-2">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="0211561973-2">}</span><span class="p" data-group-id="0211561973-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="0211561973-3">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0211561973-4">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="0211561973-4">}</span><span class="p" data-group-id="0211561973-3">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">get</span><span class="p" data-group-id="0211561973-5">(</span><span class="p" data-group-id="0211561973-6">[</span><span class="ss">my</span><span class="p">,</span><span class="w"> </span><span class="ss">unknown_key</span><span class="p" data-group-id="0211561973-6">]</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p">,</span><span class="w"> </span><span class="ss">default</span><span class="p" data-group-id="0211561973-5">)</span><span class="p">.</span><span class="w">
</span><span class="ss">default</span></code></pre><h3 id="keys-2" class="section-heading">
  <a href="#keys-2" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">keys-2</p>
  </a>
  keys/2
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="is_key-3" class="section-heading">
  <a href="#is_key-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">is_key-3</p>
  </a>
  is_key/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="iterator-2-otp-21" class="section-heading">
  <a href="#iterator-2-otp-21" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">iterator-2-otp-21</p>
  </a>
  iterator/2 (OTP 21)
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="map-3" class="section-heading">
  <a href="#map-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">map-3</p>
  </a>
  map/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="merge-3" class="section-heading">
  <a href="#merge-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">merge-3</p>
  </a>
  merge/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="merge_with-4-otp-24-0" class="section-heading">
  <a href="#merge_with-4-otp-24-0" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">merge_with-4-otp-24-0</p>
  </a>
  merge_with/4 (OTP 24.0)
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="put-3" class="section-heading">
  <a href="#put-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">put-3</p>
  </a>
  put/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="3358423791-1">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-2">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-3">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-4">#{</span><span class="p" data-group-id="3358423791-4">}</span><span class="p" data-group-id="3358423791-3">}</span><span class="p" data-group-id="3358423791-2">}</span><span class="p" data-group-id="3358423791-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="3358423791-5">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-6">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-7">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-8">#{</span><span class="p" data-group-id="3358423791-8">}</span><span class="p" data-group-id="3358423791-7">}</span><span class="p" data-group-id="3358423791-6">}</span><span class="p" data-group-id="3358423791-5">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">put</span><span class="p" data-group-id="3358423791-9">(</span><span class="p" data-group-id="3358423791-10">[</span><span class="ss">my</span><span class="p">,</span><span class="w"> </span><span class="ss">more</span><span class="p">,</span><span class="w"> </span><span class="ss">deep</span><span class="p" data-group-id="3358423791-10">]</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3358423791-11">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="3358423791-11">}</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="3358423791-9">)</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="3358423791-12">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-13">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-14">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3358423791-15">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="3358423791-15">}</span><span class="p" data-group-id="3358423791-14">}</span><span class="p" data-group-id="3358423791-13">}</span><span class="p" data-group-id="3358423791-12">}</span></code></pre><h3 id="remove-3" class="section-heading">
  <a href="#remove-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">remove-3</p>
  </a>
  remove/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="size-2" class="section-heading">
  <a href="#size-2" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">size-2</p>
  </a>
  size/2
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="take-3" class="section-heading">
  <a href="#take-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">take-3</p>
  </a>
  take/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="to_list-2" class="section-heading">
  <a href="#to_list-2" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">to_list-2</p>
  </a>
  to_list/2
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="update-3" class="section-heading">
  <a href="#update-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">update-3</p>
  </a>
  update/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="8873692121-1">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-2">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-3">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-4">#{</span><span class="p" data-group-id="8873692121-4">}</span><span class="p" data-group-id="8873692121-3">}</span><span class="p" data-group-id="8873692121-2">}</span><span class="p" data-group-id="8873692121-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="8873692121-5">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-6">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-7">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-8">#{</span><span class="p" data-group-id="8873692121-8">}</span><span class="p" data-group-id="8873692121-7">}</span><span class="p" data-group-id="8873692121-6">}</span><span class="p" data-group-id="8873692121-5">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">update</span><span class="p" data-group-id="8873692121-9">(</span><span class="p" data-group-id="8873692121-10">[</span><span class="ss">my</span><span class="p">,</span><span class="w"> </span><span class="ss">unknown_key</span><span class="p" data-group-id="8873692121-10">]</span><span class="p">,</span><span class="w"> </span><span class="ss">error</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="8873692121-9">)</span><span class="p">.</span><span class="w">
</span><span class="o">*</span><span class="o">*</span><span class="w"> </span><span class="ss">exception</span><span class="w"> </span><span class="nc">error</span><span class="p">:</span><span class="w"> </span><span class="ss">bad</span><span class="w"> </span><span class="nc">key</span><span class="p">:</span><span class="w"> </span><span class="ss">unknown_key</span><span class="w">
</span><span class="mi">3</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">update</span><span class="p" data-group-id="8873692121-11">(</span><span class="p" data-group-id="8873692121-12">[</span><span class="ss">my</span><span class="p">,</span><span class="w"> </span><span class="ss">more</span><span class="p">,</span><span class="w"> </span><span class="ss">deep</span><span class="p" data-group-id="8873692121-12">]</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8873692121-13">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="8873692121-13">}</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="8873692121-11">)</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="8873692121-14">#{</span><span class="ss">my</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-15">#{</span><span class="ss">more</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-16">#{</span><span class="ss">deep</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8873692121-17">#{</span><span class="ss">nested</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">map</span><span class="p" data-group-id="8873692121-17">}</span><span class="p" data-group-id="8873692121-16">}</span><span class="p" data-group-id="8873692121-15">}</span><span class="p" data-group-id="8873692121-14">}</span></code></pre><h3 id="update_with-3" class="section-heading">
  <a href="#update_with-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">update_with-3</p>
  </a>
  update_with/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="mi">1</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="6874968254-1">#{</span><span class="ss">someone</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6874968254-2">#{</span><span class="ss">age</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">17</span><span class="p" data-group-id="6874968254-2">}</span><span class="p" data-group-id="6874968254-1">}</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="6874968254-3">#{</span><span class="ss">someone</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6874968254-4">#{</span><span class="ss">age</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">17</span><span class="p" data-group-id="6874968254-4">}</span><span class="p" data-group-id="6874968254-3">}</span><span class="w">
</span><span class="mi">2</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">maps_in</span><span class="p">:</span><span class="nf">update_with</span><span class="p" data-group-id="6874968254-5">(</span><span class="p" data-group-id="6874968254-6">[</span><span class="ss">someone</span><span class="p">,</span><span class="w"> </span><span class="ss">age</span><span class="p" data-group-id="6874968254-6">]</span><span class="p">,</span><span class="w"> </span><span class="nf">fun</span><span class="p" data-group-id="6874968254-7">(</span><span class="n">Age</span><span class="p" data-group-id="6874968254-7">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">Age</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w"> </span><span class="n">Map</span><span class="p" data-group-id="6874968254-5">)</span><span class="p">.</span><span class="w">
</span><span class="p" data-group-id="6874968254-8">#{</span><span class="ss">someone</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6874968254-9">#{</span><span class="ss">age</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">18</span><span class="p" data-group-id="6874968254-9">}</span><span class="p" data-group-id="6874968254-8">}</span></code></pre><h3 id="update_with-4" class="section-heading">
  <a href="#update_with-4" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">update_with-4</p>
  </a>
  update_with/4
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="values-2" class="section-heading">
  <a href="#values-2" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">values-2</p>
  </a>
  values/2
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="with-3" class="section-heading">
  <a href="#with-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">with-3</p>
  </a>
  with/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h3 id="without-3" class="section-heading">
  <a href="#without-3" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">without-3</p>
  </a>
  without/3
</h3>
<pre><code class="makeup erlang" translate="no"><span class="o">&lt;</span><span class="o">!</span><span class="o">--</span><span class="w"> </span><span class="n">TODO</span><span class="w"> </span><span class="o">--</span><span class="o">&gt;</span></code></pre><h2 id="build" class="section-heading">
  <a href="#build" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">build</p>
  </a>
  Build
</h2>
<pre><code class="makeup shell" translate="no"><span class="gp unselectable">$ </span><span class="">rebar3 compile
</span></code></pre><h2 id="test" class="section-heading">
  <a href="#test" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
  <p class="sr-only">test</p>
  </a>
  Test
</h2>
<pre><code class="makeup shell" translate="no"><span class="gp unselectable">$ </span><span class="">rebar3 eunit
</span></code></pre>
<div class="bottom-actions">
  <div class="bottom-actions-item">

      <a href="api-reference.html" class="bottom-actions-button" rel="prev">
        <span class="subheader">
          ← Previous Page
        </span>
        <span class="title">
API Reference
        </span>
      </a>

  </div>
  <div class="bottom-actions-item">

      <a href="license.html" class="bottom-actions-button" rel="next">
        <span class="subheader">
          Next Page →
        </span>
        <span class="title">
LICENSE
        </span>
      </a>

  </div>
</div>
      <footer class="footer">

          <p>
            On Hex.pm:

            <span class="line">
              <a href="https://hex.pm/packages/maps_in/0.2.0" class="line footer-hex-package">Package</a>
              <a href="https://preview.hex.pm/preview/maps_in/0.2.0" class="line">Preview</a>

                <a href="https://preview.hex.pm/preview/maps_in/0.2.0/show/README.md">(current file)</a>

            </span>

            <button class="a-main line footer-button display-quick-switch">
              Search
            </button>
          </p>

        <p>
          Built using
          <a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener" translate="no">ExDoc</a> (v0.29.0) for the

            <a href="https://erlang.org" title="Erlang" target="_blank" translate="no">Erlang programming language</a>

        </p>
      </footer>
    </div>
  </div>
</section>
</div>


  </body>
</html>
